
import java.util.HashMap;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author pson
 */
public class Improvement {
    
    /*
     * Name of this improvement
     */
    private String name;
    
    /**
     * type of resource produced
     */
    private Resource resource;
    
    
    /**
     * amount of resource produced
     */
    private int bonus;
    
    private Improvement[] upgrades;
    
    /**
     * Resource cost of building this improvement
     * key is the resource, value is the number needed
     */
    private HashMap<Resource, Integer> cost;

    public Improvement(String name, Resource resource, int bonus) {
        this.name = name;
        this.resource = resource;
        this.bonus = bonus;
        
        this.cost = new HashMap<Resource, Integer>();
        this.upgrades = null;
    }
    
    public void setUpgrades(Improvement[] upgrades) {
        this.upgrades = upgrades;
    }
    
    public void addCost(Resource r, int num) {
        cost.put(r, num);
    }
    
    
}
